<a href="index.jsp" class="atop">后面的class是什么意思

来源:百度知道 编辑:UC知道 时间:2024/05/16 23:28:17

class 是类,用来定义 style 属性。
在使用 CSS(样式表)时用 class 可以更方便。
举例:
文件1:C1.CSS
.Bar
{
border-right: 2px outset;
border-top: 2px outset;
overflow: auto;
border-left: 2px outset;
border-bottom: 2px outset;
}
.BCap
{
color: graytext;
}

.BDroper
{
border-right: 2px outset;
border-top: 2px outset;
border-left: 2px outset;
width: 1px;
cursor: move;
border-bottom: 2px outset;
position: static;
height: 100%;
}

这个文件定义了三个类(class):
Bar 工具栏的样式
BCap 工具栏标题的样式
BDroper 工具栏拖动按钮的样式

文件2:Main.HTM (HTML)
<HTML>
<HEAD>
<LINK href="C1.CSS" type=text/css rel=stylesheet> <!--样式表的路径-->
</HEAD>
<BODY>
<DIV class="Bar">
<a class="BDroper"></a>
<a class=